# Contributor: Vladimir Luzan <vluzan@disroot.org>
# Maintainer: Vladimir Luzan <vluzan@disroot.org>
pkgname=pcem
pkgver=17
pkgrel=2
pkgdesc="Retro PC emulator"
url="http://pcem-emulator.co.uk"
# not supported due to pcem specifics
arch="all !aarch64 !armv7 !armhf !ppc64le !s390x !riscv64"
license="GPL-2.0-only"
makedepends="wxwidgets-dev openal-soft-dev sdl2-dev alsa-lib-dev make autoconf automake"
source="http://pcem-emulator.co.uk/files/PCemV${pkgver}Linux.tar.gz"

prepare() {
	default_prepare
	autoreconf
}

build() {
	CPPFLAGS="$CPPFLAGS -flto=auto" \
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--enable-alsa \
		--enable-release-build \
		--enable-networking
	make
}

package() {
	make -C src DESTDIR="$pkgdir" install
}

sha512sums="
6d84c8cbe9b6116f6439f542ac08139cfc5652a34b615a1ed841a6f8c227e77f1d26573ec35d57511b9a69e7472fbe51f2abb9307f8f8c1207c74fbe8107cadd  PCemV17Linux.tar.gz
"
